{% load i18n %}
<!DOCTYPE html>
<html>
<head>
    {% load static %}
    {% block meta %}
    {% endblock meta %}

		<meta charset="utf-8"/>
		<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"/>
{#		<link href="img/favicon.png" rel="icon" type="image/x-icon"/>#}

        <link href="https://fonts.googleapis.com/css?family=Exo+2" rel="stylesheet">
        <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">

{#        <link href="{% static 'main/style/bazo.css' %}" rel="stylesheet">#}
        <link href="{% static 'main/style/t_bazo.css' %}" rel="stylesheet">
        <link href="{% static 'komunumoj/style/komunumo.css' %}" rel="stylesheet">
        {#    jQuery    #}
        <script src="https://code.jquery.com/jquery-3.2.1.min.js" crossorigin="anonymous"></script>
        {# <script src="{% static 'main/script/jquery.min.js' %}"></script> #}
        {#    Интерфейс    #}
        <script src="{% static 'main/script/bazo.js' %}"></script>
		<script src="{% static 'main/script/ui.js' %}"></script>

        {% block css_js %}
        {% endblock css_js %}

        <title>{% block title %}{% endblock title %} — {% trans 'Teknokomo' %}</title>
        <!-- Matomo -->
        <script type="text/javascript">
            var _paq = _paq || [];
            /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
            _paq.push(['trackPageView']);
            _paq.push(['enableLinkTracking']);
            (function() {
                var u="//analitiko.tehnokom.su/";
                _paq.push(['setTrackerUrl', u+'piwik.php']);
                _paq.push(['setSiteId', '1']);
                var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
                g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
            })();
        </script>
        <!-- End Matomo Code -->
</head>
<body>

<!-- Мобильное меню
=========================================================== -->
<div class="m_sidebar" data-role="mobile_sidebar">
    {% if user.is_authenticated %}
        <nav class="m_sidebar__menu">
    		<div class="m_sidebar__menu__search">
    			<input type="text" placeholder="Поиск временно отключен" disabled />
    		</div>
                <a href="/idu{{ user.id }}" class="m_sidebar__menu__user">
                    {% if a_uzanto.fotoj_fotojuzantojavataro_posedanto__bildo_min %}
                        <img class="in-ava" src="/media/{{ a_uzanto.fotoj_fotojuzantojavataro_posedanto__bildo }}">
                    {% else %}
                        {% if user.sekso == 'vira' or user.sekso is None %}
                            <img class="in-ava" src="{% static 'main/images/vira-avataro.png' %}">
                        {% elif user.sekso == 'virina' %}
                            <img class="in-ava" src="{% static 'main/images/virina-avataro.png' %}">
                        {% endif %}
                    {% endif %}
                <span>{{ a_uzanto.unua_nomo__enhavo }} {{ a_uzanto.familinomo__enhavo }}</span></a>

            <a href="/" class="m_sidebar__menu__item -newspaper">{% trans 'Poehali!' %}</a>
            <a href="/novayoj" class="m_sidebar__menu__item -newspaper">{% trans 'Novaĵoj' %}</a>
            <a href="/im" class="m_sidebar__menu__item -envelope">{% trans 'Mesaĝilo' %}</a>
            <a href="/kmr" class="m_sidebar__menu__item -person">{% trans 'Gekamaradoj' %}</a>
            <a href="/socio" class="m_sidebar__menu__item -speaker">{% trans 'Komunumoj' %}</a>
            <a href="#" class="m_sidebar__menu__item-malakt -document">{% trans 'Laboro' %}</a>
            <a href="/sano{{ user.id }}" class="m_sidebar__menu__item -heart">{% trans 'Sano' %}</a>
            <a href="#" class="m_sidebar__menu__item-malakt -baloon">{% trans 'Dekretumoj' %}</a>
            <a href="/premioj" class="m_sidebar__menu__item -trophy">{% trans 'Premioj' %}</a>
            <a href="#" class="m_sidebar__menu__item-malakt -book">{% trans 'Enciklopedio' %}</a>
            <div class="m_sidebar__menu__line"></div>
            <a href="#" class="m_sidebar__menu__item-malakt -no_icon">{% trans 'Sciigoj' %}</a>
            <a href="/agru{{ user.id }}" class="m_sidebar__menu__item -no_icon">{% trans 'Agordoj' %}</a>
            <a href="/p5" class="m_sidebar__menu__item -no_icon">{% trans 'Helpo' %}</a>
            <div class="m_sidebar__menu__line"></div>
            <a href="{% url 'registrado:elsaluti' %}" class="m_sidebar__menu__item -no_icon">{% trans 'Elsaluti' %}</a>
        </nav>
    {% else %}
        <nav class="m_sidebar__menu">
{#            <div class="m_sidebar__menu__search">#}
{#                <input type="text" placeholder="Поиск"/>#}
{#            </div>    #}
            <div class="t_bazo_formo_bloko">
                <span><p>{% trans 'Вход в систему' %}</p></span>
            </div>
            <form method="POST" action="{% url 'registrado:ensaluti' %}">
                {% csrf_token %}
                <div class="t_bazo_formo_bloko">
                    <p>{{ registrado_formo.user.label }}</p>
                    <p>{{ registrado_formo.user }}</p>
                    <small>{{ registrado_formo.user.errors }}</small>
                    <p>{{ registrado_formo.password.label }}</p>
                    <p>{{ registrado_formo.password }}</p>
                    <small>{{ registrado_formo.password.errors }}</small>
                </div>
                <div class="t_bazo_formo_bloko">
                    <button class="t_submit" id="registrado_selection_submit" style="width: 100%;">{% trans 'Ensaluti' %}</button>
                </div>
                <div class="t_bazo_formo_bloko">
                    <p><a href="{% url 'registrado:restarigo' %}">{% trans 'Renovigi aliron' %}</a></p>
                </div>
                <div class="t_bazo_formo_bloko">
                    <p><a href="{% url 'registrado:registrado' %}">{% trans 'Registrado' %}</a></p>
                </div>
            </form>
        </nav>
    {% endif %}
</div>


<!-- Общий контейнер
=========================================================== -->
<div class="l_base">

	<!-- Шапка
	=========================================================== -->
	<header class="l_header">
		<div class="g_inner">
			<a class="m_menu_trigger" data-role="menu_trigger"><span></span></a>
			<a href="/" class="l_header__logo"></a>
		</div>
	</header>
	
	<!-- Контент
	=========================================================== -->
	<div class="l_content">
		<div class="g_inner">
			<div class="l_content__main">

                {% block t_main %}
                {% endblock t_main %}

			</div>
		</div>
	</div>
	
</div>

<div style="display: none">
{% block hidden_blocks %}
{% endblock %}
</div>
</body>
</html>